{% extends "../master.html" %}

{% block header %}
    {% include "../header.html" %}
{% endblock %}

{% block page %}
    <h1>Yams</h1>
    <h3>Chose game:</h3>
    <div class="game">
        <table>
            {% for game in games %}
            <tr>
                <td>
                    <form class="form" action="/yams/choose_game" method="post">
                    <div class="button">
                        <input name="game_name" value="{{ game.name }}" type="submit" />
                        <input name="game_key" value="{{ game.key }}" type="hidden" />
                        <input name="player_key" value="{{ player.key }}" type="hidden" />
                        <input name="size_key" value="{{ size.key }}" type="hidden" />
                        <input name="language_key" value="{{ language.key }}" type="hidden" />
                    </div>
                    </form>
                </td>
            </tr>
            {% endfor %}
        </table>
        <form class="form" action="/yams/choose_game" method="post">
        <div class="button">
            <input name="cancel" value="Cancel" type="submit" />
            <input name="player_key" value="{{ player.key }}" type="hidden" />
            <input name="size_key" value="{{ size.key }}" type="hidden" />
            <input name="language_key" value="{{ language.key }}" type="hidden" />
        </div>
        </form>
    </div>
{% endblock %}

{% block footer %}
    {% include "../footer.html" %}
{% endblock %}
